<template>
  <div class="tabbar">
    <!-- 底部标签 -->
    <van-tabbar route  active-color="#58bc58">
      <van-tabbar-item
        :icon="item.icon"
        v-for="item in menu"
        :key="item.name"
        :to="item.path"
       
        >{{ item.text }}</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>
<script>
export default {
  name: "tabbar",
  data() {
    return {
      menu: [
        {
          name: "home",
          path: "/home",
          icon: "home-o",
          text: "首页",
        },
        {
          name: "list",
          path: "/list",
          icon: "apps-o",
          text: "分类",
        },
        {
          name: "cart",
          path: "/cart",
          icon: "shopping-cart-o",
          text: "购物车",
        },
        {
          name: "mine",
          path: "/mine",
          icon: "user-o",
          text: "我的",
        },
      ],
    };
  },
};
</script>
